package Day_04;

public class ExtendThreeDemo {
    public static void main(String[] args) {
        int count = 0;
        /*int year_index;
        for(int i=1900;i<=2023;i++){
            year_index=((i%4==0 && i%100!=0) || (i%400==0))?0:1;
            if(year_index==0){
                if(count%10!=9){
                    System.out.print(i+" ");
                }else if(count%10==9){
                    System.out.println(i);
                }
                count++;
            }
        }*/
        for(int year=1900;year<=2023;year++){
            if((year%4==0 && year%100!=0) || year%400==0){
                System.out.print(year+" ");
                count++;
                if(count%10==0) System.out.println();
            }
        }
    }

}
